<template>
	<view>
		<view class="borde-padd-24">
			<view class="title">
				提交您的宝贵意见
			</view>
			<textarea class="textarea" v-model="feedback_content" placeholder="请输入" name="" id="" cols="30" rows="10"></textarea>
			<view class="title">
				您的联系方式
			</view>
			<input class="input" v-model="tel_phone" type="text" placeholder="请输入">
			<view class="footerButtom" @click="userFeedback">提交</view>
		</view>
	</view>
</template>

<script>
	import {
		Request
	} from '@/utils/request.js'
import { setTimeout } from 'timers'
	export default{
		data(){
			return {
				feedback_content:'',
				tel_phone:'',
			}
		},
		methods:{
			// /api/user/feedback
			userFeedback(){
				Request('user/feedback',{
					feedback_content:this.feedback_content,
					tel_phone:this.tel_phone,
				},'POST').then(()=>{
					uni.showToast({
					    title: '操作成功',
					    icon: 'success',
					    duration: 1000
					});
					setTimeout(()=>{
						uni.navigateBack({
						    delta: 1 // delta值为1时，关闭当前页面
						});
					},1000)
					
				})
			}
		}
	}
</script>

<style scoped>
	.title{
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		padding-top: 32rpx;
		padding-bottom: 16rpx;
		color: #646669;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}
	.textarea{
		min-height: 228rpx;
		background: #F7F8FA;
		width: 100%;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		padding:20rpx;
		font-size: 28rpx;
		color: #8F9294;
		box-sizing: border-box;
		line-height: 42rpx;
		font-style: normal;
		text-transform: none;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}
	.input{
		height: 88rpx;
		background: #F7F8FA;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		padding: 0 24rpx;
		color: #8F9294;
		line-height: 42rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}
	.footerButtom{
		height: 80rpx;
		background: #3B5EEC;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #FFFFFF;
		line-height: 80rpx;
		margin-top: 70rpx;
		text-align: center;
		font-style: normal;
		text-transform: none;
	}
</style>